package com.centit.springbootdemo04.conditional;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhao_jx
 * @date 2020/7/5 18:24
 */
@Configuration
//@Conditional({TestCondition.class})
public class TestConditionalConfiguration {

    @Conditional({TestCondition.class})
    @Bean
    public TestBean testBean(){
        return new TestBean();
    }

    @Bean
    public TestOtherBean testOtherBean(){
        return new TestOtherBean();
    }
}
